package com.example.demo.pojo;


import com.baomidou.mybatisplus.annotation.*;
import com.sun.istack.NotNull;
import lombok.*;



@Getter
@TableName(value = "User")
public class User {
    @TableId(type = IdType.AUTO)
    private Integer user_id;//用户id

    @TableField("username")
    private String username;//用户名

    @TableField("avatar")
    private String avatar;//头像

    @NotNull
    @TableField("email")
    private String email;//邮箱

    @NotNull
    @TableField("password")
    private String password;//密码

    @TableField("address")
    private String address;//收货地址

    @TableField("user_state")
    private Boolean user_state;//账号状态

    public User(Integer user_id, String username, String avatar, String email, String password, String address) {
        this.user_id = user_id;
        this.username = username;
        this.avatar = avatar;
        this.email = email;
        this.password = password;
        this.address = address;
    }


    public User(Integer user_id, String username, String avatar, String email, String password, String address, Boolean user_state) {
        this.user_id = user_id;
        this.username = username;
        this.avatar = avatar;
        this.email = email;
        this.password = password;
        this.address = address;
        this.user_state = user_state;
    }

    public User() {
    }

    public Integer getUser_id() {
        return user_id;
    }

    public String getUsername() {
        return username;
    }

    public String getAvatar() {
        return avatar;
    }

    public String getEmail() {
        return email;
    }

    public String getPassword() {
        return password;
    }

    public String getAddress() {
        return address;
    }

    public Boolean getUser_state() {
        return user_state;
    }

    public void setUser_state(Boolean user_state) {
        this.user_state = user_state;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setAddress(String address) {
        this.address = address;
    }


    @Override
    public String toString() {
        return "User{" +
                "user_id=" + user_id +
                ", username='" + username + '\'' +
                ", avatar='" + avatar + '\'' +
                ", email='" + email + '\'' +
                ", password='" + password + '\'' +
                ", address='" + address + '\'' +
                ", user_state=" + user_state +
                '}';
    }
}